<extend name="Console:index"/>
<block name="main">

    <h1 class=" text-center" style="color: #000000">权限节点管理</h1>

    <div style="margin-bottom: 10px">
        <a href="{:U('Node/addNode')}" class="btn btn-warning">增加节点</a>
    </div>

    <div>
        <table class="table table-hover">
            <tr>
                <th>ID</th>
                <th>节点名称</th>
                <th>节点标题</th>
                <th>节点描述</th>
                <th>排序</th>
                <th>父节点</th>
                <th>节点类型</th>
                <th>节点状态</th>
            </tr>

            <volist name="list" id="l" key="k">
                <tr>
                    <td>{$k}</td>
                    <td>{$l.t}<a href="{:U('Node/addNode',array('nid'=>$l['id']))}">{$l.name}</a></td>
                    <td><a href="{:U('Node/addNode',array('nid'=>$l['id']))}">{$l.title}</a></td>
                    <td>{$l.remark}</td>
                    <td>{$l.sort}</td>
                    <td>{$l.pid}</td>
                    <td>
                        <switch name="l.level">
                            <case value="1">应用</case>
                            <case value="2">控制器</case>
                            <case value="3">方法</case>
                            <default/>
                        </switch>
                    </td>
                    <td>
                        <eq name="l.status" value="1">
                            <a href="{:U('Node/es',array('nid'=>$l['id'],'st'=>1))}">启用</a>
                            <else/>
                            <a href="{:U('Node/es',array('nid'=>$l['id'],'st'=>0))}" style="color: red">禁止</a>
                        </eq>
                    </td>
                </tr>

            </volist>

        </table>
    </div>

    <div>
        <a href="{:U('Node/addNode')}" class="btn btn-warning btn-lg col-md-offset-5 ">增加节点</a>
    </div>

    <div style="margin-bottom: 20px"></div>

    </div>

</block>